<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.util.*" %>
<%@page import="com.hz.util.ParamUtil" %>
<%@page import="com.hz.control.ParamDepartmentManager"%>
<%@page import="com.hz.control.ParamSpecialManage"%>
<%@page import="com.hz.model.ParamSpecial"%>
<%  
    request.setCharacterEncoding("utf-8");
    int sid = 0;
   // System.out.print(session.getAttribute("usercpid"));
   //用于查询时获取到session
    if(session.getAttribute("serachdid")!=null&&!session.getAttribute("serachdid").equals("")){
       sid = Integer.parseInt(""+session.getAttribute("serachdid"));
     }
     //System.out.print(cpid);
	int did=ParamUtil.getInt(request,"departmentId",0);
	//if(pid!=null&&!pid.equals("")){
	  //  id=Integer.parseInt(pid);
	//}
	//System.out.print(id);
	List<ParamSpecial> m = ParamSpecialManage.getSpecialByDepartment(did);
	Iterator<ParamSpecial> iterator = m.iterator();
	while(iterator.hasNext()){
	ParamSpecial ps = (ParamSpecial)iterator.next();
%>	
 <option value="<%=ps.getId() %>" <%if(sid==ps.getId()) out.println("selected='selected'");%> ><%=ps.getSpecialName()%></option>

<%
}
session.removeAttribute("serachdid");
 %>
